A The disk cache is currently (System 7) stored in the SysParmType record, which
you can retrieve with the GetSysPPtr() call (documented in Inside
Macintosh:Operating Systems Utilities, chapter 7). The misc field contains
the size of the disk cache in 32K chunks stored in bits 8-15.
You can access this information using code such as:
#includeshort GetDiskCacheSize(void) { SysPPtr pramPtr; short diskCacheSize; pramPtr = GetSysPPtr(); diskCacheSize = ( ((unsigned short)(pramPtr->misc)) >> 8 ) << 5; // diskCacheSize is now the size in K of the disk cache return(diskCacheSize); }
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help